@model LookupDemoInput    
@{
    ViewBag.Title = "lookup demo";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Lookups demo</h2>
<p class="ui-state-highlight" style="margin-bottom: -5px;">
    click on the button to open the lookup and after do a search for 'a', or 'o', you
    can select the item by double-clicking a row, or click once and click OK</p>
<div class="big">
    @using (Html.BeginForm())
    {          
        <div class="efield">
            <div class="elabel">
                Country * :</div>
            <div class="einput">
                @Html.Lookup("CountryId", Model.CountryId, title: "select a country (type some letters from the start like 'us' and hit search/enter)", clearButton: true)
            </div>
            @Html.ValidationMessageFor(o => o.CountryId)
        </div>
        @Html.EditorFor(o => o.Person)
        @Html.Example("with paging")
        @Html.EditorFor(o => o.Team.ThePerson)        
        @Html.EditorFor(o => o.HobbyGuid)
        <br class="cbt" />
        <p class='ui-state-highlight' style="margin-bottom: -5px;">
            Lookups with multiselect, open and drag/drop items, or click on the <span class="ui-icon ui-icon-circle-plus ico">
                &nbsp;</span> <span class="ui-icon ui-icon-circle-arrow-n ico">&nbsp;</span>
            after click ok
        </p>
        @Html.EditorFor(o => o.Hobbies)
        @Html.Example("with paging")
        @Html.EditorFor(o => o.People)
        @Html.EditorFor(o => o.Show)
        <div class="efield">
            <div class="elabel">
                Characters :</div>
            <div class="einput">
                @Html.LookupFor(o => o.Characters, data: new Dictionary<string, string> { { "Show", "showId" }, { "Hobbies", "hobbiesIds" } }, multiselect: true, fullscreen: true, title:"drag and drop")
            </div>
        </div>
        @Html.Example("available characters are from the selected <b>Show</b> and have at least one hobby from <b>Hobbies</b>");
        @Html.Example("for Show = not selected => chars from all shows, similar for empty Hobbies");        
        
    @Html.EditorFor(o => o.CharFriends)
    @Html.EditorFor(o => o.CharsSouthPark)
        <div class="efield">
            <div class="elabel">
                post values and send them back</div>
            <input type="submit" value="submit" />
        </div>
    }
</div>
